//
//  Qb_MessageDetailViewController.m
//  Cd_Qb
//
//  Created by mac on 2018/3/15.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "Qb_MessageDetailViewController.h"

@interface Qb_MessageDetailViewController ()
@property (weak, nonatomic) IBOutlet UILabel *textLB;

@end

@implementation Qb_MessageDetailViewController

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    
    self.navigationController.navigationBar.hidden = NO;
    self.tabBarController.tabBar.hidden = YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self AdaptationApp];
    self.title = @"系统消息";
    
    self.textLB.attributedText = [self setStyleWithText:self.textLB.text];
}

- (NSAttributedString *)setStyleWithText:(NSString *)text
{
    
    NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
    paragraphStyle.paragraphSpacing         = 10;  //段落高度
    paragraphStyle.lineSpacing              = 0;   //行高
    NSDictionary *attributes                = @{NSParagraphStyleAttributeName:paragraphStyle};
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:text];
    [attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"PingFang-SC-Medium" size:14.0f] range:NSMakeRange(0, text.length)];
    [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:138.0f/255.0f green:138.0f/255.0f blue:138.0f/255.0f alpha:1.0f] range:NSMakeRange(0, text.length)];
    [attributedString addAttributes:attributes range:NSMakeRange(0, text.length)];
    
    return attributedString;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
